<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // console.log(a);//报错
        let a = 1;
        let b = 2;
        // let a = 3;
        let obj = {
            name: 'tom',
            age: 18
        }
        obj.name = 'xiaoming';
        const obj1 = {
            name: 'jack'
        };
        obj1.name = 'rose';
        // const在引用常量时，常量改变会报错，如果常量时引用数据类型，例如数组 对象，更改其中的内容，则不会报错
        console.log(c);
        var c = 123;
        const dd = 123;
    </script>
</body>

</html>